package com.lcc.lynx.eps;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class CtlVO {
    CtlVO(Class clazz, String uri){
        this.ctlName = clazz.getSimpleName();
        // 首字母小写
        this.keyName = this.ctlName.substring(0, 1).toLowerCase() +
                this.ctlName.substring(1, this.ctlName.length() - 10) + "Api";
        Class[] interfaces = clazz.getInterfaces();
        this.implementName = "";
        if(interfaces.length > 0){
            this.implementName = interfaces[0].getSimpleName();
        }
        this.apis = new ArrayList<>();
        this.uri = uri;
    }
    private String ctlName;
    private String keyName;
    private String uri;
    private String implementName;
    private List<ApiVO> apis;
}
